package com.acquisition.param.dto;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * modbus slave 参数
 * 对应ModbusSlaveParam
 *
 * @author wuqiwei
 * @date 2020/10/15
 */
public class ModbusSlaveConfig {

	@JSONField(name="type")
	private String type;

	@JSONField(name="mn")
	private String mn;

	@JSONField(name="modbusSlaveEnabled")
	private int modbusSlaveEnabled;

	@JSONField(name="modbusAddress")
	private int modbusAddress;

	@JSONField(name="IO1")
	private int IO1;

	@JSONField(name="IO2")
	private int IO2;

	public ModbusSlaveConfig() {
		super();
	}

	public ModbusSlaveConfig(String type, String mn, int modbusSlaveEnabled, int modbusAddress, int iO1, int iO2) {
		super();
		this.type = type;
		this.mn = mn;
		this.modbusSlaveEnabled = modbusSlaveEnabled;
		this.modbusAddress = modbusAddress;
		IO1 = iO1;
		IO2 = iO2;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getMn() {
		return mn;
	}

	public void setMn(String mn) {
		this.mn = mn;
	}

	public int getModbusSlaveEnabled() {
		return modbusSlaveEnabled;
	}

	public void setModbusSlaveEnabled(int modbusSlaveEnabled) {
		this.modbusSlaveEnabled = modbusSlaveEnabled;
	}

	public int getModbusAddress() {
		return modbusAddress;
	}

	public void setModbusAddress(int modbusAddress) {
		this.modbusAddress = modbusAddress;
	}

	public int getIO1() {
		return IO1;
	}

	public void setIO1(int iO1) {
		IO1 = iO1;
	}

	public int getIO2() {
		return IO2;
	}

	public void setIO2(int iO2) {
		IO2 = iO2;
	}

	@Override
	public String toString() {
		return "ModbusSlaveConfig [type=" + type + ", mn=" + mn + ", modbusSlaveEnabled=" + modbusSlaveEnabled
				+ ", modbusAddress=" + modbusAddress + ", IO1=" + IO1 + ", IO2=" + IO2 + "]";
	}

}
